home *** CD-ROM | disk | FTP | other *** search
- \ Mirror the string at address $40 and put it at address $80
- ASSEMBLE
-
- $40 CONSTANT STR1
- $80 CONSTANT STR2
-
- 0 ORG
-
- LDY # STR1
- LDB ,Y+ \ Fetch length byte of first string.
- STB STR2 \ Store it at address of second string.
- LDX # STR2 1+
- ABX \ Add length to strarting addr of string.
- TSTB
- 0<> IF
- BEGIN
- LDA ,Y+ \ Get byte of string. (increment pointer)
- STA ,-X \ Store byte into other string. (decrement pointer).
- DECB \ Decrement length
- 0= UNTIL
- THEN
- JMP $FFFF \ Jump to breakpoint.
-
- ENDASM
-
-